<!--内啮合齿轮强度校核-->
<template>
  <div class="igsc_base">
    <a-row style="height: 98%;width:100% ">
      <a-col :span="17" style="height: 100%">
        <div class="igsc_left">
          <div class="igsc_u1">
            <div class="igsc_u1_font">参数</div>
          </div>
          <img style="position: absolute;top: 3%;left: 15%;height: 21%;width: 20%" src="@/assets/image/image_07_5.png" alt="参数图片">
          <div class="igsc_left_top_left">
            <div class="igsc_u2">
              <div class="igsc_u2_font">齿轮材料基本参数</div>
            </div>
            <div class="igsc_left_top_left1">
              <ul style="height: 90%;width: 100%">
                <li style="height: 11%;margin-top: 11%">材料类型</li>
                <li style="height: 11%">屈服应力(MPa)</li>
                <li style="height: 11%">接触疲劳极限应力(Mpa)</li>
                <li style="height: 11%">弯曲疲劳极限应力(Mpa)</li>
                <li style="height: 11%">齿面硬度(HB)</li>
                <li style="height: 11%">弹性模量(MPa)</li>
                <li style="height: 11%">泊松比</li>
                <li>
                  <span  v-show="form.calculate_KV==1" style="height: 11%">密度(kg/m^3)</span>
                </li>
              </ul>
            </div>
            <div class="igsc_left_top_left2">
              <ul style="height: 90%;width: 80%">
                <li style="height: 8%">外齿</li>
                <li style="height: 11%">
                  <select v-model="form.material_type_p" style="height: 80%;width: 80%">
                    <option value="1">渗碳淬火</option>
                    <option value="2">调质</option>
                    <option value="3">渗氮钢</option>
                    <option value="4">结构钢</option>
                    <option value="5">感应淬火和火焰淬火钢</option>
                    <option value="6">氮碳共渗钢</option>
                  </select>
                </li>
                <li style="height: 11%"><input v-model="form.sigma_s_p" style="height: 60%;width: 80%"/></li>
                <li style="height: 11%"><input v-model="form.sigma_Hlim_p" style="height: 60%;width: 80%"/></li>
                <li style="height: 11%"><input v-model="form.sigma_Flim_p" style="height: 60%;width: 80%"/></li>
                <li style="height: 11%"><input v-model="form.hardness_HB_p" style="height: 60%;width: 80%"/></li>
                <li style="height: 11%"><input v-model="form.E_p" style="height: 60%;width: 80%"/></li>
                <li style="height: 11%"><input v-model="form.possion_p" style="height: 60%;width: 80%"/></li>
                <li style="height: 11%">
                  <span v-show="form.calculate_KV==1"><input v-model="form.density_p" style="height: 60%;width: 80%"/></span>
                </li>
              </ul>
            </div>
            <div class="igsc_left_top_left3">
              <ul style="height: 90%;width: 80%">
                <li style="height: 8%">内齿</li>
                <li style="height: 11%">
                  <select v-model="form.material_type_w" style="height: 80%;width: 80%">
                    <option value="1">渗碳淬火</option>
                    <option value="2">调质</option>
                    <option value="3">渗氮钢</option>
                    <option value="4">结构钢</option>
                    <option value="5">感应淬火和火焰淬火钢</option>
                    <option value="6">氮碳共渗钢</option>
                  </select>
                </li>
                <li style="height: 11%"><input v-model="form.sigma_s_w" style="height: 60%;width: 80%"/></li>
                <li style="height: 11%"><input v-model="form.sigma_Hlim_w" style="height: 60%;width: 80%"/></li>
                <li style="height: 11%"><input v-model="form.sigma_Flim_w" style="height: 60%;width: 80%"/></li>
                <li style="height: 11%"><input v-model="form.hardness_HB_w" style="height: 60%;width: 80%"/></li>
                <li style="height: 11%"><input v-model="form.E_w" style="height: 60%;width: 80%"/></li>
                <li style="height: 11%"><input v-model="form.possion_w" style="height: 60%;width: 80%"/></li>
                <li style="height: 11%">
                  <span v-show="form.calculate_KV==1" ><input v-model="form.density_w" style="height: 60%;width: 80%"/></span>
                </li>
              </ul>
            </div>
          </div>
          <div class="igsc_left_top_right">
            <div class="igsc_u3">
              <div class="igsc_u3_font">齿形参数输入</div>
            </div>
            <div class="igsc_left_top_right1">
              <ul style="height: 80%;width: 100%">
                <li style="height: 7%"></li>
                <li style="height: 7%">齿顶高系数</li>
                <li style="height: 7%">顶隙系数</li>
                <li style="height: 7%">齿根圆角半径系数</li>
                <li style="height: 7%">轮缘厚度系数</li>
                <li style="height: 7%">齿向倒角高度(直径)(mm)</li>
                <li style="height: 7%">齿向倒角角度(°)</li>
                <li style="height: 7%">齿顶削减量(直径)(mm)</li>
                <li style="height: 7%">挖根量(mm)</li>
                <li style="height: 7%">齿面粗糙度Rz(um)</li>
                <li style="height: 7%">齿根圆角粗糙度Rz (um)</li>
                <li style="height: 7%">齿厚上偏差(um)</li>
                <li style="height: 7%">齿厚公差(um)</li>
                <li style="height: 7%">弯曲强度计算齿厚值(um)</li>
                <li style="height: 7%">加工内齿刀具变位系数</li>
                <li style="height: 7%">加工内齿刀具齿数</li>
                <li style="height: 7%">
                  <span v-if="form.calculate_KV==1||form.calculate_KHb==1||form.calculate_KHa==1||form.calculate_KFa==1">精度等级</span>
                </li>
              </ul>
            </div>
            <div class="igsc_left_top_right2">
              <ul style="height: 80%;width: 100%">
                <li style="height: 7%">外齿</li>
                <li style="height: 7%"><input v-model="form.ad_factor_p" style="height: 80%;width: 80%"/></li>
                <li style="height: 7%"><input v-model="form.tip_factor_p" style="height: 80%;width: 80%"/></li>
                <li style="height: 7%"><input v-model="form.radius_factor_p" style="height: 80%;width: 80%"/></li>
                <li style="height: 7%"><input v-model="form.SR_p" style="height: 80%;width: 80%"/></li>
                <li style="height: 7%"><input v-model="form.chamfer_dia_p" style="height: 80%;width: 80%"/></li>
                <li style="height: 7%"><input v-model="form.chamfer_angle_p" style="height: 80%;width: 80%"/></li>
                <li style="height: 7%"><input v-model="form.ad_cut_dia_p" style="height: 80%;width: 80%"/></li>
                <li style="height: 7%"><input v-model="form.undercut_p" style="height: 80%;width: 80%"/></li>
                <li style="height: 7%"><input v-model="form.R_z_flank_p" style="height: 80%;width: 80%"/></li>
                <li style="height: 7%"><input v-model="form.R_z_root_p" style="height: 80%;width: 80%"/></li>
                <li style="height: 7%"><input v-model="form.thickness_reduction_p" style="height: 80%;width: 80%"/></li>
                <li style="height: 7%"><input v-model="form.tooth_thickness_tolerance_p" style="height: 80%;width: 80%"/></li>
                <li style="height: 7%"><span>{{ans.f1}}</span>
                  <select v-model="form.bend_strength_thickness_p" style="height: 80%;width: 80%">
                    <option value="1">最小</option>
                    <option value="2">平均</option>
                    <option value="3">最大</option>
                  </select></li>
                <li style="height: 7%"><input v-model="form.cutter_shift_coefficient" v-bind:disabled="form.auto_cutter==1" style="height: 80%;width: 80%"/></li>
                <li style="height: 7%"><input v-model="form.z_cutter" v-bind:disabled="form.auto_cutter==1" style="height: 80%;width: 80%"/></li>
                <li style="height: 7%">
                    <span v-if="form.calculate_KV==1||form.calculate_KHb==1||form.calculate_KHa==1||form.calculate_KFa==1">
                      <select v-model="form.quality_grade_p" style="height: 80%;width: 80%">
                      <option value="1">0</option>
                      <option value="2">1</option>
                      <option value="3">2</option>
                      <option value="4">3</option>
                      <option value="5">4</option>
                      <option value="6">5</option>
                      <option value="7">6</option>
                      <option value="8">7</option>
                      <option value="9">8</option>
                      <option value="10">9</option>
                      <option value="11">10</option>
                      <option value="12">11</option>
                      <option value="13">12</option>
                    </select>
                    </span>
                </li>
              </ul>
            </div>
            <div class="igsc_left_top_right3">
              <ul style="height: 80%;width: 100%">
                <li style="height: 7%">内齿</li>
                <li style="height: 7%"><input v-model="form.ad_factor_w" style="height: 80%;width: 80%"/></li>
                <li style="height: 7%"><input v-model="form.tip_factor_w" style="height: 80%;width: 80%"/></li>
                <li style="height: 7%"><input v-model="form.radius_factor_w" style="height: 80%;width: 80%"/></li>
                <li style="height: 7%"><input v-model="form.SR_w" style="height: 80%;width: 80%"/></li>
                <li style="height: 7%"><input v-model="form.chamfer_dia_w" style="height: 80%;width: 80%"/></li>
                <li style="height: 7%"><input v-model="form.chamfer_angle_w" style="height: 80%;width: 80%"/></li>
                <li style="height: 7%"><input v-model="form.ad_cut_dia_w" style="height: 80%;width: 80%"/></li>
                <li style="height: 7%"><input v-model="form.undercut_w" style="height: 80%;width: 80%"/></li>
                <li style="height: 7%"><input v-model="form.R_z_flank_w" style="height: 80%;width: 80%"/></li>
                <li style="height: 7%"><input v-model="form.R_z_root_w" style="height: 80%;width: 80%"/></li>
                <li style="height: 7%"><input v-model="form.thickness_reduction_w" style="height: 80%;width: 80%"/></li>
                <li style="height: 7%"><input v-model="form.tooth_thickness_tolerance_w" style="height: 80%;width: 80%"/></li>
                <li style="height: 7%"><span>{{ans.f2}}</span>
                  <select v-model="form.bend_strength_thickness_w" style="height: 80%;width: 80%">
                    <option value="1">最小</option>
                    <option value="2">平均</option>
                    <option value="3">最大</option>
                  </select></li>
                <form style="position: absolute; right: 50%; margin-top: 1%"><!--v-model="InParameter.auto_cutter"-->
                  <input type="radio" name="way" value="1" v-model="form.auto_cutter">自动<br>
                  <input type="radio" name="way" value="2" v-model="form.auto_cutter">手动
                </form>
                <li style="height: 7%"></li>
                <li style="height: 7%"></li>
                <li style="height: 7%">
                    <span v-if="form.calculate_KV==1||form.calculate_KHb==1||form.calculate_KHa==1||form.calculate_KFa==1">
                      <select v-model="form.quality_grade_w" style="height: 80%;width: 80%">
                      <option value="1">0</option>
                      <option value="2">1</option>
                      <option value="3">2</option>
                      <option value="4">3</option>
                      <option value="5">4</option>
                      <option value="6">5</option>
                      <option value="7">6</option>
                      <option value="8">7</option>
                      <option value="9">8</option>
                      <option value="10">9</option>
                      <option value="11">10</option>
                      <option value="12">11</option>
                      <option value="13">12</option>
                    </select>
                    </span>
                </li>
              </ul>
            </div>
          </div>
          <div class="igsc_left_bottom">
            <div class="igsc_u4">
              <div class="igsc_u4_font">载荷及相关数据输入</div>
            </div>
            <div class="igsc_left_bottom_left">
              <div class="igsc_left_bottom_left1">
                <ul style="height: 100%;width: 100%">
                  <li style="height: 8%">
                    <span style="width: 100%;height: 100%" v-show="form.whether_rate_load==1">外齿轮额定转速(rpm)</span>
                  </li>
                  <li style="height: 8%">运行工况</li>
                  <li style="height: 8%">允许点蚀</li>
                  <li style="height: 8%">接触长寿命系数</li>
                  <li style="height: 8%">弯曲长寿命系数</li>
                  <li style="height: 8%">设计载荷输入形式</li>
                  <li v-show="form.whether_rate_load==1" style="height: 8%"></li>
                  <li v-show="form.whether_rate_load==1" style="height: 8%">外齿轮额定形式(Nmm)</li>
                  <li v-show="form.whether_rate_load==1" style="height: 8%"><span v-show="form.whether_power == 1">扭矩(Nmm)</span><span v-show="form.whether_power == 2">功率(kW)</span></li>
                  <li v-show="form.whether_rate_load==1" style="height: 8%">设计寿命</li>
                </ul>
              </div>
              <div class="igsc_left_bottom_left2">
                <ul style="width: 100%;height: 100%">
                  <li style="height: 8%"><input v-model="form.n_p" style="height: 80%;width: 80%"/></li>
                  <li style="height: 8%"><select v-model="form.whether_single_rotation" style="height: 80%;width: 80%">
                    <option value="1">单向运转</option>
                    <option value="2">双向运转</option>
                  </select></li>
                  <li style="height: 8%"><select v-model="form.switch_pitting" style="height: 80%;width: 80%">
                    <option value="1">是</option>
                    <option value="2">否</option>
                  </select></li>
                  <li style="height: 8%"><input v-model="form.Znt_Longlife" style="height: 80%;width: 80%"/></li>
                  <li style="height: 8%"><input v-model="form.Ynt_Longlife" style="height: 80%;width: 80%"/></li>
                  <li style="height: 8%"><select v-model="form.whether_rate_load" style="height: 80%;width: 80%">
                    <option value="1">额定工况</option>
                    <option value="2">载荷谱</option>
                  </select></li>
                  <li style="height: 8%">
                    <a-upload
                        :showUploadList="false"
                        name="file"
                        :maxCount="1"
                        :customRequest="customRequest"
                    >
                      <button v-show="form.whether_rate_load == 2" style="height: 100%;width: 120%">导入外齿轮载荷谱</button>
                    </a-upload>
                  </li>
                  <table v-show="form.whether_rate_load==2" border="1" style="position: absolute; bottom: 33%; left: -130%;width: 250%;height: 10%;overflow: auto">
                    <thead style="width: 100%; height: 10%;background: #D7D7D7">
                    <tr class="table_title">
                      <th>序号</th>
                      <th>扭矩(Nmm)</th>
                      <th>循环次数</th>
                      <th>转速(rpm)</th>
                    </tr>
                    </thead>
                    <tbody>
                    <tr style="text-align: center" v-for="(load_data,index) in items" :key="index">
                      <td>{{load_data[0]}}</td>
                      <td>{{load_data[1]}}</td>
                      <td>{{load_data[2]}}</td>
                      <td>{{load_data[3]}}</td>
                    </tr>
                    </tbody>
                  </table>
                  <li v-show="form.whether_rate_load==1" style="height: 8%"><select v-model="form.whether_power" style="height: 80%;width: 80%">
                    <option value="1">输入扭矩</option>
                    <option value="2">输入功率</option>
                  </select></li>
                  <li v-show="form.whether_rate_load==1" style="height: 8%">
                    <input v-model="form.spectrum_torque" v-show="form.whether_power==1" style="height: 80%;width: 80%"/>
                    <input v-model="form.spectrum_power" v-show="form.whether_power==2"/>
                  </li>
                  <li v-show="form.whether_rate_load==1" style="height: 8%"><input v-model="form.spectrum_time" style="height: 80%;width: 80%"/></li>
                </ul>
              </div>
            </div>
            <div class="igsc_left_bottom_center">
              <div class="igsc_left_bottom_center1">
                <ul style="height: 100%;width: 100%">
                  <li style="height: 16%">使用系数</li>
                  <li style="height: 16%">动载系数</li>
                  <li style="height: 16%">接触齿向载荷分布系数</li>
                  <li style="height: 16%">接触齿间载荷分布系数</li>
                  <li style="height: 16%">弯曲齿向载荷分布系数</li>
                  <li style="height: 16%">弯曲齿向载荷分布系数</li>
                </ul>
              </div>
              <div class="igsc_left_bottom_center2">
                <ul style="height: 100%;width: 100%">
                  <li style="height: 16%"><input v-model="form.K_A" style="height: 40%;width: 80%"/></li>
                  <li style="height: 16%"><input v-model="form.K_V" v-show="form.calculate_KV==0" style="height: 40%;width: 80%"/></li>
                  <li style="height: 16%"><input v-model="form.K_Hb" v-show="form.calculate_KHb==0" style="height: 40%;width: 80%"/></li>
                  <li style="height: 16%"><input v-model="form.K_Ha" v-show="form.calculate_KHa==0" style="height: 40%;width: 80%"/></li>
                  <li style="height: 16%"><input v-model="form.K_Fb" v-show="form.calculate_KFb==0" style="height: 40%;width: 80%"/></li>
                  <li style="height: 16%"><input v-model="form.K_Fa" v-show="form.calculate_KFa==0" style="height: 40%;width: 80%"/></li>
                </ul>
              </div>
              <div class="igsc_left_bottom_center3">
                <ul style="height: 100%;width: 100%">
                  <li style="height: 15%"><button @click="showModal1" style="width: 16%;height: 48%">!</button></li>
                  <a-modal
                      title="使用系数参考表"
                      :visible="visible1"
                      @ok="handleOk1"
                      @cancel="handleCancel1"
                  >
                    <img  style="height: 100%;width: 100%" src="@/assets/image/image_07_1.png">
                  </a-modal>
                  <li style="height: 16%"><form style="position: absolute; left: 0; width: 100%;height: 100%">
                    <input v-model="form.calculate_KV" type="radio" name="way" value="0">用户输入<!--user_defined_KV-->
                    <button @click="showModal2" style="width: 16%;height: 8%">!</button><br>
                    <a-modal
                        title="动载系数参考表"
                        :visible="visible2"
                        @ok="handleOk2"
                        @cancel="handleCancel2"
                    >
                      <img style="height: 100%;width: 100%" src="@/assets/image/image_07_2.png" alt="动载系数参考表">
                    </a-modal>
                    <input v-model="form.calculate_KV" type="radio" name="way" value="1">程序计算
                  </form></li>
                  <li style="height: 16%"><form style="position: absolute; left: 0;width: 100%;height: 100%">
                    <input v-model="form.calculate_KHb" type="radio" name="way" value="0">用户输入<br><!--user_defined_KHb-->
                    <input v-model="form.calculate_KHb" type="radio" name="way" value="1">程序计算
                  </form></li>
                  <li style="height: 16%"><form style="position: absolute; left: 0;width: 100%;height: 100%">
                    <input v-model="form.calculate_KHa" type="radio" name="way" value="0">用户输入<!--user_defined_KHa-->
                    <button @click="showModal3" style="width: 16%;height: 8%">!</button><br>
                    <a-modal
                        title="齿间载荷分配系数参考表"
                        :visible="visible3"
                        @ok="handleOk3"
                        @cancel="handleCancel3"
                    >
                      <img
                          style="height: 100%;width: 100%"
                          src="@/assets/image/image_07_6.png"
                      />
                    </a-modal>
                    <input v-model="form.calculate_KHa" type="radio" name="way" value="1">程序计算
                  </form></li>
                  <li style="height: 16%"><form style="position: absolute; left: 0;width: 100%;height: 100%">
                    <input v-model="form.calculate_KFb" type="radio" name="way" value="0">用户输入<br><!--user_defined_KFb-->
                    <input v-model="form.calculate_KFb" type="radio" name="way" value="1">程序计算
                  </form></li>
                  <li style="height: 16%"><form style="position: absolute; left: 0;width: 100%;height: 100%">
                    <input v-model="form.calculate_KFa" type="radio" name="way" value="0">用户输入<!--user_defined_KFa-->
                    <button @click="showModal3" style="width: 16%;height: 8%">!</button><br>
                    <a-modal
                        title="齿间载荷分配系数参考表"
                        :visible="visible3"
                        @ok="handleOk3"
                        @cancel="handleCancel3"
                    >
                      <img style="height: 100%;width: 100%" src="@/assets/image/image_07_6.png">
                    </a-modal>
                    <input v-model="form.calculate_KFa" type="radio" name="way" value="1">程序计算
                  </form></li>
                </ul>
              </div>
            </div>
            <div class="igsc_left_bottom_right">
              <div class="igsc_left_bottom_right1">
                <ul style="width: 100%;height: 100%">
                  <li style="height: 12%;width: 100%">润滑油类型</li>
                  <li style="height: 12%;width: 100%">润滑油40C粘度(mm^2/s)</li>
                  <li v-show="form.calculate_KHb==1" style="height: 12%;width: 100%">外齿轮轴当量外径(mm)</li>
                  <li v-show="form.calculate_KHb==1" style="height: 12%;width: 100%">外齿轮轴结构形式</li>
                  <li v-show="form.calculate_KHb==1" style="height: 12%;width: 100%">外齿轮轴承跨距(mm)</li>
                  <li v-show="form.calculate_KHb==1" style="height: 12%;width: 100%">外齿轮齿宽中点至轴承跨距中心距离(mm)</li>
                  <li v-show="form.calculate_KHb==1" style="height: 12%;width: 100%">齿向修形类型</li>
                  <li v-show="form.calculate_KHb==1" style="height: 12%;width: 100%">齿面接触印痕状况</li>
                </ul>
              </div>
              <div class="igsc_left_bottom_right2">
                <ul style="width: 100%;height: 100%">
                  <li style="height: 12%;width: 100%"><select v-model="form.oil_type" style="width: 60%;height: 60%">
                    <option value="1">矿物油</option>
                    <option value="2">合成油</option>
                  </select></li>
                  <li style="height: 12%;width: 100%"><input v-model="form.v_40" style="width: 60%;height: 60%"></li>
                  <li style="height: 12%;width: 100%"><input v-model="form.dsh" v-show="form.calculate_KHb==1" style="width: 60%;height: 60%"/></li>
                  <li style="height: 12%;width: 100%"><select v-model="form.Arrangement" v-show="form.calculate_KHb==1" style="width: 60%;height: 60%">
                    <option value="1">a</option>
                    <option value="2">b</option>
                    <option value="3">c</option>
                    <option value="4">d</option>
                    <option value="5">e</option>
                  </select>
                    <button @click="showModal4" v-show="form.calculate_KHb==1" style="height: 70%;width: 16%;margin-left: 2%">!</button></li>
                  <a-modal
                      title="小齿轮轴结构形式参考图"
                      :visible="visible4"
                      @ok="handleOk4"
                      @cancel="handleCancel4"
                  >
                    <img style="height: 100%;width: 100%" src="@/assets/image/image_07_3.png">
                  </a-modal>
                  <li style="height: 12%;width: 100%"><input v-model="form.L" v-show="form.calculate_KHb==1" style="width: 60%;height: 60%"/></li>
                  <li style="height: 12%;width: 100%"><input v-model="form.s" v-show="form.calculate_KHb==1" style="width: 60%;height: 60%"/></li>
                  <li style="height: 12%;width: 100%"><select v-model="form.modification_type" v-show="form.calculate_KHb==1" style="width: 60%;height: 60%">
                    <option value="1">1.无修行</option>
                    <option value="2">2.仅修鼓，修形量0.5*fma</option>
                    <option value="3">3.仅修鼓，修形量0.5*(fma+fsh)</option>
                    <option value="4">4.螺旋线修形</option>
                    <option value="5">5.螺旋线修形+修鼓(case2+case4)</option>
                    <option value="6">6.齿端倒坡</option>
                  </select></li>
                  <li style="height: 12%;width: 100%"><select v-model="form.contact_pattern_condition" v-show="form.calculate_KHb==1" style="width: 60%;height: 60%">
                    <option value="1">未能验证有良好接触</option>
                    <option value="2">达到期望的接触斑点，例如采用齿向修形等方式使变形和误差相互补偿</option>
                    <option value="3">达到理性的接触斑点</option>
                  </select></li>
                </ul>
              </div>
            </div>
          </div>
        </div>
      </a-col>
      <a-col span="7" style="height: 100%">
        <div class="igsc_right">
          <div class="igsc_right_top">
            <div class="igsc_u5">
              <div class="igsc_u5_font">齿轮宏观参数输入</div>
            </div>
            <div class="igsc_right_top1">
              <ul style="height: 100%;width: 100%">
                <li style="height: 9%"></li>
                <li style="height: 9%">设计法向模数(mm)</li>
                <li style="height: 9%">设计齿数</li>
                <li style="height: 9%">设计法向压力角(°)</li>
                <li style="height: 9%">设计螺旋角(°)</li>
                <li style="height: 9%">设计中心距(mm)</li>
                <li style="height: 9%">设计法向变位系数</li>
                <li style="height: 9%">设计齿宽(mm)</li>
                <li style="height: 9%">
                  <span v-if="form.calculate_KV==1||form.calculate_KHb==1||form.calculate_KHa==1||form.calculate_KFa==1">辐板厚度(mm)</span>
                </li>
                <li style="height: 9%">
                  <span v-show="form.calculate_KV==1">轮缘内径(mm)</span>
                </li>
              </ul>
            </div>
            <div class="igsc_right_top2">
              <ul style="height: 100%;width: 100%">
                <li style="height: 9%;width: 100%">
                  <span style="width: 48%;margin-right: 20%">外齿</span>
                  <span style="width: 48%">内齿</span>
                </li>
                <li style="height: 9%;width: 100%"><input v-model="form.normal_module" style="height: 80%;width: 80%"/></li>
                <li style="height: 9%;width: 100%">
                  <input v-model="form.z_p" style="height: 80%;width: 38%;margin-right: 5%"/>
                  <input v-model="form.z_w" style="height: 80%;width: 38%"/>
                </li>
                <li style="height: 9%;width: 100%"><input v-model="form.press_angle" style="height: 80%;width: 80%"/></li>
                <li style="height: 9%;width: 100%"><input v-model="form.helix_angle" style="height: 80%;width: 80%"/></li>
                <li style="height: 9%;width: 100%"><input v-model="form.work_center" style="height: 80%;width: 80%"/></li>
                <li style="height: 9%;width: 100%;display: flex;margin-left: 10%">
                  <input v-model="form.normal_modi_factor_p" style="height: 80%;width: 38%"/>
                  <label style="height: 80%;width: 38%">{{ans.normal_modi_factor_w}}</label>
                </li>
                <li style="height: 9%;width: 100%"><input v-model="form.width_p" style="height: 80%;width: 80%"/></li>
                <li style="height: 9%;width: 100%">
                  <input v-model="form.web_thickness_p"  v-if="form.calculate_KV==1||form.calculate_KHb==1||form.calculate_KHa==1||form.calculate_KFa==1" style="height: 80%;width: 38%;margin-right: 5%"/>
                  <input v-model="form.web_thickness_w"  v-if="form.calculate_KV==1||form.calculate_KHb==1||form.calculate_KHa==1||form.calculate_KFa==1" style="height: 80%;width: 38%"/>
                </li>
                <li style="height: 9%;width: 100%">
                  <input v-model="form.D_p"  v-show="form.calculate_KV==1" style="height: 80%;width: 31.5%"/>
                  <input v-model="form.D_w"  v-show="form.calculate_KV==1" style="height: 80%;width: 31.5%"/>
                  <button @click="showModal5"  v-show="form.calculate_KV==1" style="height: 95%;width: 5%">!</button>
                  <a-modal
                      title="轮缘内径参考图"
                      :visible="visible5"
                      @ok="handleOk5"
                      @cancel="handleCancel5"
                  >
                    <img style="height: 100%;width: 100%" src="@/assets/image/image_07_4.png">
                  </a-modal>
                </li>
              </ul>
            </div>
          </div>
          <button @click="calculation" style="position: absolute; height: 3%;width: 20%;top: 35%">计算</button>
          <div class="igsc_right_center">
            <div class="igsc_u6">
              <div class="igsc_u6_font">齿轮疲劳强度校核结果</div>
            </div>
            <div class="igsc_right_center1">
              <ul style="height: 90%;width: 100%;margin-top: 2%">
                <li style="height: 12%">外齿弯曲疲劳安全系数(正转)</li>
                <li style="height: 12%">外齿接触疲劳安全系数(正转)</li>
                <li style="height: 12%">内齿弯曲疲劳安全系数(正转)</li>
                <li style="height: 12%">内齿接触疲劳安全系数(正转)</li>
                <li style="height: 12%">外齿弯曲疲劳安全系数(反转)</li>
                <li style="height: 12%">外齿接触疲劳安全系数(反转)</li>
                <li style="height: 12%">内齿弯曲疲劳安全系数(反转)</li>
                <li style="height: 12%">内齿接触疲劳安全系数(反转)</li>
              </ul>
            </div>
            <div class="igsc_right_center2">
              <ul style="height: 90%;width: 100%;margin-top: 2%">
                <li style="height: 12%">{{ans.safe_F_damage_p_positive}}</li>
                <li style="height: 12%">{{ans.safe_H_damage_p_positive}}</li>
                <li style="height: 12%">{{ans.safe_F_damage_w_positive}}</li>
                <li style="height: 12%">{{ans.safe_H_damage_w_positive}}</li>
                <li style="height: 12%">{{ans.safe_F_damage_p_negative}}</li>
                <li style="height: 12%">{{ans.safe_H_damage_p_negative}}</li>
                <li style="height: 12%">{{ans.safe_F_damage_w_negative}}</li>
                <li style="height: 12%">{{ans.safe_H_damage_w_negative}}</li>
              </ul>
            </div>
          </div>
          <div class="igsc_right_bottom">
            <div style="width: 100%;height: 100%">
              <div style="overflow-x: hidden;text-align: center;border-radius:3px;background-color:#F2F2F2">
                <div style="width: 100%;height: 100%">
                  <tr style="height: 20%;text-align: center;background-color:#EAEAEA">
                    <th>序号</th>
                    <th>动载系数</th>
                    <th>接触齿间载荷分布系数</th>
                    <th>接触齿间载荷分布系数</th>
                    <th>弯曲齿向载荷分布系数</th>
                    <th>弯曲齿间载荷分布系数</th>
                  </tr>
                  <tr style="text-align: center" v-show="ans.flag==1">
                    <td>1</td>
                    <td>{{ans.K_V_vector_negative}}</td>
                    <td>{{ans.K_Hb_vector_negative}}</td>
                    <td>{{ans.K_Ha_vector_negative}}</td>
                    <td>{{ans.K_Fb_vector_negative}}</td>
                    <td>{{ans.K_Fa_vector_negative}}</td>
                  </tr>
                  <tr style="text-align: center" v-show="ans.flag==2">
                    <td>1</td>
                    <td>{{ans.K_V_vector_positive}}</td>
                    <td>{{ans.K_Hb_vector_positive}}</td>
                    <td>{{ans.K_Ha_vector_positive}}</td>
                    <td>{{ans.K_Fb_vector_positive}}</td>
                    <td>{{ans.K_Fa_vector_positive}}</td>
                  </tr>
                </div>
              </div>
            </div>
          </div>
        </div>
      </a-col>
    </a-row>
  </div>
</template>

<script>

import {check, firetext} from "@/api/file";

export default {
  created() {
    document.title = '内啮合齿轮强度校核'
    this.$store.state.file.key = 7;

  },
  name: "Internal_gear_strength_check",

  methods: {
    customRequest(data) {
      const formData = new FormData()
      formData.append('fileName',data.file)
      firetext(formData)
          .then(res =>{//这里需要用箭头函数，否则箭头函数里面的this就不是外面的那个this
            console.log(res)
            this.items=res.data.filedata;
          })
          .catch(error =>{
            console.log(error)
          });
    },
    calculation() {
      check(this.form)
          .then(res => {
            console.log(res);
            // if (res.code === 200) {
            //   console.log(res.data.first);
            //   this.ans = res.data;
            // }
            this.ans.flag=res[0];
            this.ans.K_V_vector_positive=res[1];
            this.ans.K_Hb_vector_positive=res[2];
            this.ans.K_Ha_vector_positive=res[3];
            this.ans.K_Fb_vector_positive=res[4];
            this.ans.K_Fa_vector_positive=res[5];
            this.ans.thickness_reduction_last_p=res[6];
            this.ans.thickness_reduction_last_w=res[7];
            this.ans.safe_F_damage_p_positive=res[8];
            this.ans.damage_bending_sum_p_positive=res[9];
            this.ans.safe_F_damage_w_positive=res[10];
            this.ans.damage_bending_sum_w_positive=res[11];
            this.ans.safe_H_damage_p_positive=res[12];
            this.ans.damage_contact_sum_p_positive=res[13];
            this.ans.safe_H_damage_w_positive=res[14];
            this.ans.damage_contact_sum_w_positive=res[15];
            this.ans.K_V_vector_negative=res[16];
            this.ans.K_Hb_vector_negative=res[17];
            this.ans.K_Ha_vector_negative=res[18];
            this.ans.K_Fb_vector_negative=res[19];
            this.ans.K_Fa_vector_negative=res[20];
            this.ans.safe_F_damage_p_negative=res[21];
            this.ans.damage_bending_sum_p_negative=res[22];
            this.ans.safe_F_damage_w_negative=res[23];
            this.ans.damage_bending_sum_w_negative=res[24];
            this.ans.safe_H_damage_p_negative=res[25];
            this.ans.damage_contact_sum_p_negative=res[26];
            this.ans.safe_H_damage_w_negative=res[27];
            this.ans.damage_contact_sum_w_negative=res[28];
            this.ans.normal_modi_factor_w=res[29];
            this.ans.uitable=res[30];
          })
          .catch(error => {
            console.error(error);
          });
    },
    showModal1() {
      this.visible1 = true;
    },
    //点击ok
    handleOk1() {
      this.visible1 = false;
    },
    //点击cancel
    handleCancel1() {
      this.visible1 = false;
    },
    showModal2() {
      this.visible2 = true;
    },
    //点击ok
    handleOk2() {
      this.visible2 = false;
    },
    //点击cancel
    handleCancel2() {
      this.visible2 = false;
    },
    showModal3() {
      this.visible3 = true;
    },
    //点击ok
    handleOk3() {
      this.visible3 = false;
    },
    //点击cancel
    handleCancel3() {
      this.visible3 = false;
    },
    showModal4() {
      this.visible4 = true;
    },
    //点击ok
    handleOk4() {
      this.visible4 = false;
    },
    //点击cancel
    handleCancel4() {
      this.visible4 = false;
    },
    showModal5() {
      this.visible5 = true;
    },
    //点击ok
    handleOk5() {
      this.visible5 = false;
    },
    //点击cancel
    handleCancel5() {
      this.visible5 = false;
    },
    showModal6() {
      this.visible6 = true;
    },
    //点击ok
    handleOk6() {
      this.visible6 = false;
    },
    //点击cancel
    handleCancel6() {
      this.visible6 = false;
    },
  },
  data() {
    return {
      items:[[]],
      visible1: false,
      visible2: false,
      visible3: false,
      visible4: false,
      visible5: false,
      visible6: false,
      form: {
        whether_single_rotation:1,
        whether_rate_load:1,
        whether_power:1,
        spectrum_torque:153548195,
        spectrum_time:175200,
        work_center:515,
        uuid:"",
        possion_p:0.3,
        possion_w:0.3,
        E_p:206000,
        E_w:206000,
        K_A:1,
        K_V:1.1,
        K_Hb:1.3,
        K_Ha:1.05,
        K_Fb:1.3,
        K_Fa:1.05,
        Znt_Longlife:0.85,
        Ynt_Longlife:0.85,
        material_type_p:1,
        material_type_w:1,
        switch_pitting:2,
        z_p:48,
        z_w:149,
        normal_module:10,
        helix_angle:8.9,
        normal_modi_factor_p:0,
        press_angle:20,
        ad_factor_p:1,
        ad_factor_w:1,
        tip_factor_p:0.25,
        tip_factor_w:0.25,
        chamfer_dia_p:0,
        chamfer_dia_w:0,
        ad_cut_dia_p:0,
        ad_cut_dia_w:0,
        width_p:413,
        v_40:320,
        oil_type:1,
        n_p:49.7527,
        R_z_flank_p:4.8,
        R_z_flank_w:4.8,
        hardness_HB_p:621.3,
        hardness_HB_w:621.3,
        sigma_Hlim_p:1500,
        sigma_Hlim_w:1500,
        radius_factor_p:0.3,
        radius_factor_w:0.2,
        undercut_p:0,
        undercut_w:0,
        R_z_root_p:19.2,
        R_z_root_w:19.2,
        sigma_s_p:785,
        sigma_s_w:785,
        sigma_Flim_p:1000,
        sigma_Flim_w:1000,
        chamfer_angle_p:45,
        chamfer_angle_w:45,
        SR_p:3.5,
        SR_w:3.5,
        thickness_reduction_p:0,
        tooth_thickness_tolerance_p:0,
        thickness_reduction_w:0,
        tooth_thickness_tolerance_w:0,
        bend_strength_thickness_p:1,
        bend_strength_thickness_w:1,
        dsh:450,
        Arrangement:1,
        L:200,
        s:20,
        modification_type:1,
        contact_pattern_condition:1,
        quality_grade_p:0,
        quality_grade_w:0,
        web_thickness_p:110,
        web_thickness_w:110,
        D_p:0,
        D_w:0,
        density_p:7800,
        density_w:7800,
        cutter_shift_coefficient:0,
        z_cutter:39,
        auto_cutter:1,
        K_A_internal:1,
        K_V_constant:1.1,
        user_defined_KV:1,
        K_Hb_constant:1.3,
        calculate_KV:0,
        user_defined_KHb:1,
        calculate_KHb:0,
        K_Ha_constant:1.05,
        user_defined_KHa:1,
        calculate_KHa:0,
        K_Fb_constant:1.3,
        user_defined_KFb:1,
        calculate_KFb:0,
        K_Fa_constant:1.05,
        user_defined_KFa:1,
        calculate_KFa:0,
        spectrum_power:153548195,
      },
      ans: {
        K_V_vector_positive:'Text',
        K_Hb_vector_positive:'Text',
        K_Ha_vector_positive:'Text',
        K_Fb_vector_positive:'Text',
        K_Fa_vector_positive:'Text',
        thickness_reduction_last_p:'Text',
        thickness_reduction_last_w:'Text',
        safe_F_damage_p_positive:'Text',
        damage_bending_sum_p_positive:'Text',
        safe_F_damage_w_positive:'Text',
        damage_bending_sum_w_positive:'Text',
        safe_H_damage_p_positive:'Text',
        damage_contact_sum_p_positive:'Text',
        safe_H_damage_w_positive:'Text',
        damage_contact_sum_w_positive:'Text',
        K_V_vector_negative:'',
        K_Hb_vector_negative:'',
        K_Ha_vector_negative:'',
        K_Fb_vector_negative:'',
        K_Fa_vector_negative:'',
        safe_F_damage_p_negative:'Text',
        damage_bending_sum_p_negative:'Text',
        safe_F_damage_w_negative:'Text',
        damage_bending_sum_w_negative:'Text',
        safe_H_damage_p_negative:'Text',
        damage_contact_sum_p_negative:'Text',
        safe_H_damage_w_negative:'Text',
        damage_contact_sum_w_negative:'Text',
        normal_modi_factor_w:'Text',
        nn:'',
      }
    };
  }
}
</script>

<style scoped>
input {
  text-align: center;
}
label {
  text-align: center;
}
.igsc_base {
  position: relative;
  height: 100%;
  width: 100%;
  overflow-y: hidden;
  overflow-x: hidden;
  font-size: 13px;
}
.igsc_left {
  position: absolute;
  height: 100%;
  width: 98%;
  top: 1%;
  left: 1%;
  box-shadow: 1.5px 1.5px 2px #aaaaaa;
  border: 0.5px solid rgba(231, 231, 231, 0.486);
  border-radius: 3px;
}
.igsc_u1 {
  height: 3%;
  width: 100%;
  background: inherit;
  background-color: rgba(215, 215, 215, 1);
}
.igsc_u1_font {
  margin-left: 10px;
  word-wrap: break-word;
  text-transform: none;
}
.igsc_left_top_left {
  position: absolute;
  top: 24%;
  left: 1%;
  right: 1%;
  height: 35%;
  width: 48%;
  box-shadow: 1.5px 1.5px 2px #aaaaaa;
  border: 0.5px solid rgba(231, 231, 231, 0.486);
  border-radius: 3px;
}
.igsc_u2 {
  height: 8%;
  width: 100%;
  background: inherit;
  background-color: rgba(215, 215, 215, 1);
}
.igsc_u2_font {
  margin-left: 10px;
  word-wrap: break-word;
  text-transform: none;
}
.igsc_left_top_left1 {
  width: 38%;
  height: 100%;
  text-align: right;
}

.igsc_left_top_left2 {
  position: absolute;
  top: 8%;
  left: 40%;
  width: 30%;
  height: 100%;
  text-align: center;
}
.igsc_left_top_left3 {
  position: absolute;
  top: 8%;
  right: 0;
  width: 30%;
  height: 100%;
  text-align: center;
}
.igsc_left_top_right {
  position: absolute;
  top: 4%;
  right: 1%;
  height: 55%;
  width: 48%;
  box-shadow: 1.5px 1.5px 2px #aaaaaa;
  border: 0.5px solid rgba(231, 231, 231, 0.486);
  border-radius: 3px;
}
.igsc_u3 {
  height: 5%;
  width: 100%;
  background: inherit;
  background-color: rgba(215, 215, 215, 1);
}
.igsc_u3_font {
  margin-left: 10px;
  word-wrap: break-word;
  text-transform: none;
}
.igsc_left_top_right1 {
  position: absolute;
  top: 5%;
  left: 0;
  height: 100%;
  width: 36%;
  text-align: right;
}
.igsc_left_top_right2 {
  position: absolute;
  top: 5%;
  left: 40%;
  height: 100%;
  width: 30%;
  text-align: center;
}
.igsc_left_top_right3 {
  position: absolute;
  top: 5%;
  right: 0;
  height: 100%;
  width: 30%;
  text-align: center;
}
.igsc_left_bottom {
  position: absolute;
  top: 60%;
  left: 1%;
  height: 40%;
  width: 98%;
  box-shadow: 1.5px 1.5px 2px #aaaaaa;
  border: 0.5px solid rgba(231, 231, 231, 0.486);
  border-radius: 3px;
}
.igsc_u4 {
  height: 7%;
  width: 100%;
  background: inherit;
  background-color: rgba(215, 215, 215, 1);
}
.igsc_u4_font {
  margin-left: 10px;
  word-wrap: break-word;
  text-transform: none;
}
.igsc_left_bottom_left {
  position: absolute;
  left: 0;
  width: 26%;
  height: 100%;
}
.igsc_left_bottom_left1 {
  position: absolute;
  left: 0;
  height: 100%;
  width: 60%;
  text-align: right;
}
.igsc_left_bottom_left2 {
  position: absolute;
  right: 0;
  height: 100%;
  width: 40%;
  text-align: center;
}
.igsc_left_bottom_center {
  position: absolute;
  left: 28%;
  height: 100%;
  width: 42%;
}
.igsc_left_bottom_center1 {
  position: absolute;
  height: 100%;
  width: 38%;
  left: 0;
  text-align: right;
}
.igsc_left_bottom_center2 {
  position: absolute;
  height: 100%;
  width: 25%;
  left: 39%;
  text-align: center;
}
.igsc_left_bottom_center3 {
  position: absolute;
  height: 100%;
  width: 36%;
  right: 0;
}
.igsc_left_bottom_right {
  position: absolute;
  right: 0;
  height: 100%;
  width: 30%;
}
.igsc_left_bottom_right1 {
  position: absolute;
  left: 0;
  width: 50%;
  height: 100%;
  text-align: right;
}
.igsc_left_bottom_right2 {
  position: absolute;
  left: 51%;
  width: 49%;
  height: 100%;
  text-align: center;
}
.igsc_right {
  position: absolute;
  top: 1%;
  height: 100%;
  width: 100%;
  box-shadow: 1.5px 1.5px 2px #aaaaaa;
  border: 0.5px solid rgba(231, 231, 231, 0.486);
  border-radius: 3px;
}
.igsc_u5 {
  height: 10%;
  width: 100%;
  background: inherit;
  background-color: rgba(215, 215, 215, 1);
}
.igsc_u5_font {
  margin-left: 10px;
  word-wrap: break-word;
  text-transform: none;
}
.igsc_right_top {
  position: absolute;
  top: 0%;
  right: 1%;
  height: 33%;
  width: 98%;
  box-shadow: 1.5px 1.5px 2px #aaaaaa;
  border: 0.5px solid rgba(231, 231, 231, 0.486);
  border-radius: 3px;
}
.igsc_right_top1 {
  position: absolute;
  left: 0;
  width: 40%;
  height: 100%;
  text-align: right;
}
.igsc_right_top2 {
  position: absolute;
  left: 40%;
  width: 60%;
  height: 100%;
  text-align: center;
}
.igsc_right_center {
  position: absolute;
  top: 40%;
  right: 1%;
  height: 33%;
  width: 98%;
  box-shadow: 1.5px 1.5px 2px #aaaaaa;
  border: 0.5px solid rgba(231, 231, 231, 0.486);
  border-radius: 3px;
}
.igsc_u6 {
  height: 10%;
  width: 100%;
  background: inherit;
  background-color: rgba(215, 215, 215, 1);
}
.igsc_u6_font {
  margin-left: 10px;
  word-wrap: break-word;
  text-transform: none;
}
.igsc_right_center1 {
  position: absolute;
  left: 0;
  height: 100%;
  width: 65%;
  text-align: right;
}
.igsc_right_center2 {
  position: absolute;
  right: 0;
  height: 100%;
  width: 35%;
  text-align: center;
}
.igsc_right_bottom {
  position: absolute;
  bottom: 2%;
  right: 1%;
  height: 25%;
  width: 98%;
  box-shadow: 1.5px 1.5px 2px #aaaaaa;
  border: 0.5px solid rgba(231, 231, 231, 0.486);
  border-radius: 3px;
  font-size: 3%;
}
</style>
